package org.pay.core.common.Exception;

import org.pay.core.common.constant.RetEnum;

/**
 * @author: yangshancheng
 * @date: 17/12/7
 * @description:
 */
public class ServiceException extends RuntimeException {

    private RetEnum retEnum;

    public ServiceException(RetEnum retEnum) {
        this.retEnum = retEnum;
    }

    public static ServiceException build(RetEnum retEnum) {
        ServiceException serviceException = new ServiceException(retEnum);
        return serviceException;
    }

    public RetEnum getRetEnum() {
        return retEnum;
    }
}
